Problem: If $x + \frac{1}{x} = 5,$ then compute the value of
\[(x - 2)^2 + \frac{25}{(x - 2)^2}.\]
Answer: From the equation $x + \frac{1}{x} = 5,$ $x^2 + 1 = 5x,$ so
\[x^2 = 5x - 1.\]Then
\[(x - 2)^2 = x^2 - 4x + 4 = (5x - 1) - 4x + 4 = x + 3.\]Hence,
\begin{align*}
(x - 2)^2 + \frac{25}{(x - 2)^2} &= x + 3 + \frac{25}{x + 3} \\
&= \frac{(x + 3)^2 + 25}{x + 3} \\
&= \frac{x^2 + 6x + 9 + 25}{x + 3} \\
&= \frac{(5x - 1) + 6x + 34}{x + 3} \\
&= \frac{11x + 33}{x + 3} \\
&= \boxed{11}.
\end{align*}